import 'package:base_lib/app.dart';
import 'package:base_lib/common/index.dart';
import 'package:base_lib/config.dart';
import 'package:base_lib/router/page_builder.dart';
import 'package:doctor_examine_lib/examine_list/examine_list_page.dart';
import 'package:doctor_examine_lib/hospital_list/hospital_list_page.dart';
import 'package:doctor_examine_lib/offline_examine/offline_examine_page.dart';
import 'package:doctor_examine_lib/repository/https.dart';

class DoctorExamineComponent extends IComponent {
  static String assetsPackageName = "doctor_examine_lib";
  static String offlineExaminePage = "$assetsPackageName/offlineExaminePage";
  static String hospitalListPage = "$assetsPackageName/hospitalListPage";
  static String examineListPage = "$assetsPackageName/examineListPage";

  @override
  void doComponentInitConfig() {
    //       buildConfigField "String", "API_PATH", "\"https://doctorlogin-cs.jk.100cbc.com\""
    // //            buildConfigField "String", "LOGIN_PATH", "\"http://10.0.0.211:6108\""
    // //            buildConfigField "String", "DOCTOR_PATH","\"http://10.0.0.211:6110\""
    // //            buildConfigField "String", "RP_PATH","\"http://10.0.0.211:6111\""
    // //            buildConfigField "String", "FILE_PATH","\"http://10.0.0.211:6104\""
    DoctorExamineHttp.createHttpProxy(mBaseUrl: Config.doctorBaseUrl);
  }

  @override
  List<EventBuilder> gePublicEvents() {
    return [];
  }

  @override
  getComponentName() {
    return "DoctorExamineComponent";
  }

  @override
  List<PageBuilder> getPages() {
    return [
      PageBuilder(offlineExaminePage, (parameters) {
        return OffineExaminePage(parameters);
      }),

      /// 医生列表
      PageBuilder(hospitalListPage, (parameters) {
        return HospitalListPage(parameters);
      }),

      /// 检查项目列表
      PageBuilder(examineListPage, (parameters) {
        return ExamineListPage(parameters);
      })
    ];
  }
}

class DoctorExamineBusName {
  static String selectHospital = "select_hospital";
}
